package spring_advice;

import proxy.ForumService;

/**
 * 带有横切的逻辑实例
 */
public class ForumSeriveImpl implements ForumService {


    public void removeTopic(int topicId) {

        // 开水监视
//        PerformanceMonitor.begin("proxy.ForumSerive.removeTopic");


        System.out.println("模拟删除topic记录");
        try {
            Thread.sleep(20);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        // 结束监视
//        PerformanceMonitor.end();
    }

    public void removeForm(int forumId) {

        // 开始监视
//        PerformanceMonitor.begin("proxy.ForumSerive.removeForm");


        System.out.println("模拟forum删除记录");
        try {
            Thread.sleep(20);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        // 结束监视
//        PerformanceMonitor.end();



    }

}
